#!/usr/bin/env python3
import eacal
from datetime import datetime
print("東亞節氣部分範例:")
c_t = eacal.EACal(zh_t=True)
chg = 1
for x in c_t.get_annual_solar_terms(2019):
if chg == 1:
print ("%2d %s %s" % (x[1], x[0], datetime.strftime(x[2], "%Y-%m-%d %H:%M %Z")),end="\t")
else:
print ("%2d %s %s" % (x[1], x[0], datetime.strftime(x[2], "%Y-%m-%d %H:%M %Z")))
chg *= -1
print("\n以下是越南的")
c_v = eacal.EACal(vi=True)
for x in c_v.get_annual_solar_terms(2019):
print ("%2d %s %s " % (x[1], x[0], datetime.strftime(x[2], "%Y-%m-%d %H:%M %Z")), end="")
print()